#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @FileName  :Contract.py
# @Time      :2024/11/12 19:23
# @Author    :zhou_yi


from datetime import datetime
from pydantic import BaseModel
from typing import Optional
from models.BaseModels import CompanyBaseModel
from settings import ContractPrice_1


class InputContract(BaseModel):
    tpl: str
    partA: Optional[str]
    partB: Optional[str]
    service_local: Optional[str]
    start: datetime
    end: datetime
    signal_price: float = ContractPrice_1
    nums: int = 1


# class ContractCompany(BaseModel):
#     name: str
#     tax: Optional[str]
#     bank: Optional[str]
#     account: Optional[str]
#     tel_1: Optional[str]
#     tel_2: Optional[str]
#     address: Optional[str]
#     user: Optional[str]
#
#     class Config:
#         extra = "ignore"


class ContractCompany(CompanyBaseModel):
    pass


class OutContract(BaseModel):
    partA: ContractCompany
    partB: ContractCompany
    service_local: Optional[str]
    service_date: str
    signal_price: str
    months: str
    price: str
    up_price: str
    nums: str
    signal_price: str


if __name__ == '__main__':
    ...
